FILES=(`ls`)
for i in ${FILES[*]}
do
    #echo $i
    FILENAME=$i
    MVNGIDFIX=.${FILENAME}
    if [[ -f ${FILENAME} ]] && [[ ${FILENAME} =~ '.sh'  ]]
    then
        echo 此文件不合法$FILENAME
        continue
    elseif
      MVNGIDFIX=""
    fi
    TOWFILES=(`ls ${FILENAME}`)
    for j in ${TOWFILES[*]}
    do
    echo 具体文件:$j
    if [[ $j =~  (.*)-([0-9].*)\.(.*) ]]
    then
#        echo ${FILENAME}
        echo jar名称:${BASH_REMATCH[1]}
        echo 版本号:${BASH_REMATCH[2]}
        echo 后缀:${BASH_REMATCH[3]}
        JARNAME=${BASH_REMATCH[1]}
        VERSION=${BASH_REMATCH[2]}
        FIX=${BASH_REMATCH[3]}
        mvn install:install-file -Dfile=${FILENAME}/$j -DgroupId=${FILENAME} -DartifactId=${JARNAME} -Dversion=${VERSION} -Dpackaging=${FIX}
    fi
    done
done
echo ${FILES[0]}
if [[ "http://www.baidu.com" =~ (https?)://([[:alnum:]]+(\.[[:alnum:]_]+)*)  ]] 
then 
 echo ${BASH_REMATCH[1]} ${BASH_REMATCH[2]}
fi
